﻿using CDMS.DAL;
using CDMS.Entities;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace CDMS.BLL
{
    public class Product_BLL
    {
        Product_DAL db;
        public Product_BLL()
        {
            db = new Product_DAL();
        }

        public DataTable GetALL()
        {
            return db.GetALL();
        }

        public DataTable GetAllByProductGroupID(int ProductGroupID)
        {
            return db.GetAllByProductGroupID(ProductGroupID);
        }

        public Product GetOne(int Product_ID)
        {
            
            return db.GetOne(Product_ID);
        }

        public int Insert(Product entity)
        {
            return db.Insert(entity);
        }
        public bool Update(Product entity)
        {

            return db.Update(entity);
        }
        public bool Exists(Product entity)
        {

            return db.Exists(entity);
        }
        public bool Delete(int Product_ID)
        {
            return db.Delete(Product_ID);
        }
    }
}
